﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;

public partial class admin_AutoNews : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {

        if (!this.IsPostBack) {
            AutoNews();
        }
    }

    private void AutoNews() {
        try
        {
            WebData db = new WebData();
            List<DataLibrary.tbl_website> list = db.tbl_Websites.GetListCache("autoWebsites", Constant.time);
            //foreach (DataLibrary.tbl_website item in list)
            //{
            //     db.AutoGetNewss.GetNews(item);
            //}
            DataLibrary.tbl_website item = new DataLibrary.tbl_website();
            item = db.tbl_Websites.GetItemById(16);
            db.AutoGetNewss.GetNews(item);
        }
        catch
        {

        }
    }
    protected void Timer1_Tick(object sender, EventArgs e)
    {
        AutoNews();
    }
}